<?php
include(ROOTPATH .'include'. DS .'protect.php');
	include ROOTPATH .'include'. DS .'isMyQuery.php';

//$jsoncallback = $_POST['jsoncallback'];
$userName 	= $_POST['userName'];	
$password	= getQuery('password');
$password	= password($password);
$partner 	= $_POST['partner'];
$referer 	= $_POST['referer'];


$sql = 'SELECT * FROM `'.DB_PRE.'user` WHERE `userName` = "'. $userName .'" and `passWord` = "'. $password .'" ';
$users = $dbs -> select($sql);

if( 0 == count($users) ){
	exit( '0');
	
}else{
	$users = $users[0];
	
	$array['loginTimes']	=	$users['loginTimes'] + 1 ;
	$dbs -> update( DB_PRE .'user' ,$array ,  ' `id` = '. $users['id'] );
	exit( '1|'. $users['id'] .'| '.$users['powder'].' ' );	
}
?>